<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <!--测试用，上线复原-->
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta content="telephone=no,email=no" name="format-detection" />
    <meta name="flexible" content="initial-dpr=2,maximum-dpr=3" />
    <title>羊仓健康生活家</title>
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" href="css/common.css"/>  
    <script type="text/javascript" src="js/jquery.min.js" ></script>
	<script type="text/javascript" src="js/flexible.js" ></script>   
    <script type="text/javascript" src="js/basePathUtil.js" ></script>
     <script type="text/javascript">
        <!--
        var basePath;
        $(document).ready(function(){
            basePath=basePath();
            // 1. 得到用户信息
//            alert("basePath："+basePath);
            var access_token = GetUrl("access_token");
//            alert("access_token："+access_token);
            getUserInfo(access_token);

            // 全部订单
            $("#allOrder").bind("click",function(){
                window.location.href= basePath+"res/orderList.html?access_token="+access_token;
            });
            // 收货地址
            $("#address").bind("click",function(){
                window.location.href= basePath+"res/addressList.html?access_token="+access_token;
            });
            // to首页
            $("#index").bind("click",function(){
                window.location.href= basePath+"v1/user/wx/login";
            });

            // to限时购
            $("#limit").bind("click",function(){
                window.location.href= basePath+"res/xsg.html?access_token="+access_token+"&type=3";
            });

            // to每日优礼
            $("#everyday").bind("click",function(){
                window.location.href= basePath+"res/mryx.html?access_token="+access_token+"&type=2";
            });

            // to购物车
            $("#shopping").bind("click",function(){
                window.location.href= basePath+"res/gwc.html?access_token="+access_token;
            });

            // to个人中心
            $("#my").bind("click",function(){
                window.location.href= basePath+"v1/user/wx/login";
            });



        });

        // 得到用户信息
             function getUserInfo(access_token){
             $.ajax({
                 url:basePath+"/v1/user/access_token",
                 type:'GET',
                data:{
                    access_token:access_token
                },
                 dataType:"json",
                 success:function(json) {
                     if (json.code == 1000) {
                         var userInfo = json.data;
                        var name =userInfo.name;
                        var photo =userInfo.photo;
                         $("#photo").attr("src", photo);
                         var userMark =userInfo.user_mark;
                         if(userMark==4){$(".top_headmember2").append('<img src="img/ycanghuiy.png" />');}
//                         $("#photo").val(photo);
                         $("#name").html(name);

                     }
                 },
                 error:function(data){
                    console.info(data.msg);
                 }
             });
         }


        //-->
      </script>


</head>
<body class="bg_f2">
<div class="usercenter">
    <div class="top_head">
    	<div class="top_headimg">
       	 	<img src="/yangcangclub/res/img/my_icon1.png" alt="" id="photo"/>
        </div>
        <div class="top_headmember2">
			<!--<img src="img/ycanghuiy.png" />-->
        </div>
        <div class="top_headmember1">
        	<img src="img/member1.png" />
        </div>
        <div class="top_name">
        	<p class="name" id="name">xxxxxxxx</p>
        </div>
        
    </div>
    <ul>
        <li id="allOrder">
            <img src="/yangcangclub/res/img/my_icon2.png" alt=""/>
            <p>全部订单</p>
         </li>
        <li id="address">
            <img src="/yangcangclub/res/img/my_icon3.png" alt=""/>
            <p>收货地址</p>
        </li>
    </ul>
</div>
<div id="nav">
    <ul class="nav-ul">
        <li id="index"><img src="/yangcangclub/res/img/1.png"><p >首页</p></li>
        <!--<li id="limit"><img src="/yangcangclub/res/img/2.png"><p>限时购</p></li>-->
        <li id="everyday"><img src="/yangcangclub/res/img/3.png"><p>每日优选</p></li>
        <li id="shopping"><img src="/yangcangclub/res/img/4.png"><p>购物车</p></li>
        <li id="my"><img src="/yangcangclub/res/img/05—.png"><p style="color:#007234">我的</p></li>

    </ul>
</div>
</body>
</html>
